{use master_page('front/v_article_master')}

{block main}
<?
$where = $this->Request(); 
// $where["class.id"] = $article_class->id;  
$where['page_size'] = 12;
$articles = $this->article_manager->get_list($where); 
$record_count = $this->article_manager->query_result->record_count;
$page_size=$where['page_size'];
?>
<!-- 文章翻页检索 -->
<style>
.pic_content{border:1px solid #E6E6E6;height:144px;margin:0px 5px 10px 0px;float:left;}
	.pic_content .pic_image img{width:136px;height:110px;}
	.pic_content .pic_title a:link,
	.pic_content .pic_title a:active,
	.pic_content .pic_title a:visited{text-decoration: none;color: #333;}
	.pic_content .pic_title a:hover{text-decoration:underline;} 
	.pic_content .pic_title{text-align:center;padding:5px 0px;}
</style>	

<form class="listform"  action="<?=_U("article/index")?>" method="get">
<div class="line">
<? foreach ( $articles as $article):?>
	<div class="pic_content">
		<div class="pic_image" >
			<a href="<?=_U("article/show?id=$article->id")?>" target="_blank">
				<?php if(sizeof($article->fetch_images())==0)
				{?>	
				<img src="images/noimage_1.jpg" boeder="0px"></img>
				<?}
				else
				{?>	
				<img src="<?=$article->fetch_image(0)?>" border="0px"></img>
				<?}?>	
			</a>
		</div>
		<div class="pic_title">
			<a href="<?=_U("article/show?id=$article->id")?>" target="_self"><?=mb_substr($article->title,0,6,'UTF8')?></a>
		</div>
	
	</div>
<? endforeach;?>
</div>
<div style="clear:both"></div>
<?$this->load->view('front/v_pager_form',array('record_count'=>$record_count,'page_size'=>$page_size))?>

</form> 

{end}